<template>
  <div class="container">
    <Category title="美食" :listData="foods">
      <!--默认插槽：在组件标签体内写标签，会将标签插入组件的插槽<slot>内-->
      <img src="https://s3.ax1x.com/2021/01/16/srJlq0.jpg" alt="">
    </Category>
    <Category title="游戏" :listData="games">
      <ul>
        <li v-for="(item,index) in games" :key="index">{{item}}</li>
      </ul>
    </Category>
    <Category title="电影" :listData="films">
      <video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" controls></video>
    </Category>
  </div>
</template>

<script>
import Category from './components/Category.vue'
export default {
  name: "App",
  components: {
    Category,
  },
  data() {
    return {
      foods: ['火锅', '小龙虾', '牛排', '烧烤'],
      games: ['红色警戒', '穿越火线', '英雄联盟'],
      films: ['《教父》', '《拆弹专家》', '《尚硅谷》']
    }
  },
  methods: {

  }
}
</script>

<style scoped>
  .container {
    display: flex; /* 弹性盒模型布局 */
    justify-content: space-around; /* 主轴对齐 */
  }
</style>
